﻿using System;
using System.Collections.Generic;
using System.Text;

namespace PIM_ATE
{
    class JcPIMDataResults
    {
        /// <summary>
        /// 扫描项序号
        /// </summary>
        public int No { get; set; }

        /// <summary>
        /// 功放1输出功率，单位 dBm
        /// </summary>
        public float P1 { get; set; }

        /// <summary>
        /// 功放1中心频率，单位 MHz
        /// </summary>
        public float F1 { get; set; }

        /// <summary>
        /// 功放2输出功率，单位 dBm
        /// </summary>
        public float P2 { get; set; }

        /// <summary>
        /// 功放2中心频率，单位 MHz
        /// </summary>
        public float F2 { get; set; }

        /// <summary>
        /// 扫描点的频率，单位 MHz
        /// </summary>
        public float Im_F { get; set; }

        /// <summary>
        /// 扫描点的互调值，单位 dBc
        public float Im_V { get; set; }

        /// <summary>
        /// 互调值修正，单位 dBm
        public float Im_V_NotFix { get; set; }

        /// <summary>
        /// 扫描点的时间
        /// </summary>
        public DateTime Time_now { get; set; }

        public int n1 { get; set; }
        public int n2 { get; set; }

        public override string ToString()
        {
            string spe = ", ";
            string ret = "";
            ret += No + spe;
            ret += F1 + spe;
            ret += P1 + spe;
            ret += F2 + spe;
            ret += P2 + spe;
            ret += Im_F + spe;
            ret += Im_V + spe;
            ret += n1 + spe;
            ret += n2 + spe;
            ret += Time_now.ToString("yyyy-MM-dd HH:mm:ss:ff");
            return ret;
        }

        public string ToFString()
        {
            string spe = "\t";
            string ret = "";
            ret += No + spe;
            ret += F1 + spe;
            ret += P1 + spe;
            ret += F2 + spe;
            ret += P2 + spe;
            ret += Im_F + spe;
            ret += Im_V + spe;
            ret += n1 + spe;
            ret += n2 + spe;
            ret += Time_now.ToString("yyyy-MM-dd HH:mm:ss:ff");
            return ret;
        }

        public JcPIMDataResults copy()
        {
            JcPIMDataResults ret = new JcPIMDataResults();
            ret.No = this.No;
            ret.P1 = this.P1;
            ret.F1 = this.F1;
            ret.P2 = this.P2;
            ret.F2 = this.F2;
            ret.Im_F = this.Im_F;
            ret.Im_V = this.Im_V;
            ret.n1 = this.n1;
            ret.n2 = this.n2;
            ret.Time_now = this.Time_now;

            return ret;
        }
    }
}
